#ifndef _PS_H_
#define _PS_H_

#include "stm32f4xx.h"

#define PS_SLCT    0x01
#define PS_STRT    0x08
#define PS_UP      0x10
#define PS_RIGHT   0x20
#define PS_DOWN    0x40
#define PS_LEFT    0x80
#define PS_L2      0x01
#define PS_R2      0x02
#define PS_L1      0x04
#define PS_R1      0x08


typedef struct
{
    uint8_t  ps_up    :1;
    uint8_t  ps_down  :1;
    uint8_t  ps_right :1;
    uint8_t  ps_left  :1;
    uint8_t  ps_L2    :1;
    uint8_t  ps_R2    :1;
    uint8_t  ps_L1    :1;
    uint8_t  ps_R1    :1;
}PSFlagManager;

extern PSFlagManager PS_Flag;

void PS_Scan(void);

void PS_Control(void);

#endif